<template>
	<view>
		<view class="none-application" v-if="applicationList.length == 0">
			暂无报名订单！
		</view>
		<view class="has-application" >
			<view class="audition-content" v-for="(item,index) in applicationList" :key="index">
				<view class="title-name">
					<view class="ac-name">{{item.eventsName}} </view>
					<view class="ac-name">{{item.courseName}} </view>
				</view>
				<view class="title-name">
				<view class="ac-subject">姓名： <test style="color: #000;">{{item.traineeName}}</test> </view>
				 <view class="ac-subject">联系方式：<test style="color: #000;">{{item.traineePhone}}</test></view>
				</view>
				<view class="ac-subject">当前状态：{{item.status === 0 ?'未报名':item.status === 1?'已报名':'已作废'}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		eventsOrder
	} from '@/utils/api.js'
	export default {
		data() {
			return {
				applicationList:[]
			}
		},
		onLoad(){
			this.eventsOrder()
		},
		methods: {
			async eventsOrder(){
				uni.showLoading()
				const data = {
					pageSize:999,
					pageNum:1,
				}
				const res = await eventsOrder(data)
				if(res.code == 200){
					uni.hideLoading()
					this.applicationList = res.rows
				}
			    
			},
		}
	}
</script>

<style>
	page {
		background-color: #efefef;
	}
</style>

<style scoped lang="scss">
.none-application{
	text-align: center;
	margin-top: 100rpx;
}
	.audition-content{
		width: 95%;
		margin: 20rpx auto;
		background-color: #fff;
		border-radius: 10rpx;
		padding: 40rpx 20rpx;
		box-sizing: border-box;
		position: relative;
	}
	.ac-name{
		font-weight: bold;
		font-size: 32rpx;
	}
	.ac-subject{
		color: #aaa8a8;
		margin-top: 10rpx;
	}
	.ac-actime{
		width:100%;
		padding: 8rpx 18rpx;
		margin: 10rpx auto;
		background-color: #f9e6ca;
		color: #ff9800 ;
	}
	.title-name{
		display: flex;
		justify-content: space-between;
	}
</style>
